﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Model;
using DAL;

namespace BLL
{
    public class BDriver
    {
        private DDriver _dDriver = new DDriver();

         public DriverInfo CheckCard(string cardId, string password)
         {
             return _dDriver.CheckCard(cardId, password);
         }

        public bool ExistsCardId(string cardId)
        {
           return _dDriver.ExistsCardId(cardId);
        }

        public bool Add(DriverInfo model)
        {
            return _dDriver.Add(model);
        }

        public bool Update(DriverInfo model)
        {
            return _dDriver.Update(model);
        }

        public bool UpdateState(string phoneNumber, int state)
        {
            return _dDriver.UpdateState(phoneNumber, state);
        }

        public bool ChangePassword(string cardId, string oldPwd, string newPwd)
        {
            return _dDriver.ChangePassword(cardId, oldPwd, newPwd);
        }

        public bool Delete(int id)
        {
            return _dDriver.Delete(id);
        }

        public DriverInfo GetModelByPhoneNum(string phoneNumber)
        {
            return _dDriver.GetModelByPhoneNum(phoneNumber);
        }

        public DataSet GetList(string strWhere)
        {
            return _dDriver.GetList(strWhere);
        }
    }
}
